home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / applications / databases / amigabase200.lha / AmigaBase / Install-AB < prev    next >
Encoding:
Text File  |  1994-10-09  |  6.1 KB  |  275 lines

  1. ; This is the Installer-script for AmigaBase.
  2.  
  3. (set OS_version (/ (getversion) 65536))
  4. (set IsKick20 (>= OS_Version 36))
  5.  
  6. (transcript "Installing AmigaBase V2.00.")
  7. (complete 0)
  8.  
  9. (set HD_Installation
  10.    (=
  11.       (askchoice
  12.          (prompt "Choose installation:")
  13.          (help "The harddisk installation installs all files"
  14.                "in a seperate directory, while the floppy"
  15.                "installation creates a working disk.")
  16.          (choices "Harddisk installation" "Floppy installation")
  17.          (default 1)
  18.       )
  19.       0
  20.    )
  21. )
  22.  
  23. (if HD_Installation
  24.    (set AB_dest_parent
  25.       (askdir
  26.          (prompt "Select disk/directory where AmigaBase should be installed. "
  27.                  "The installation program automatically creates the directory "
  28.                  "\"AmigaBase\" in this directory.")
  29.          (help @askdir-help)
  30.          (default @default-dest)
  31.       )
  32.    )
  33.    (
  34.       (set AB_dest_parent "RAM:")
  35.       (message
  36.          "The installation script assumes that you have already "
  37.          "created a copy of your Workbench disk which has at "
  38.          "least 100 kBytes free, rebooted your computer from "
  39.          "that disk and formatted a new disk with name \"AmigaBase\".\n\n"
  40.          "If not then please abort the installation now, "
  41.          "do the steps above and restart the installation.\n\n"
  42.          "The floppy installation will first copy all needed files "
  43.          "to RAM:AmigaBase and then copy them to the disk."
  44.       )
  45.    )
  46. )
  47.  
  48. (set AB_dest (tackon AB_dest_parent "AmigaBase"))
  49.  
  50. (if HD_Installation
  51.    (
  52.       (set @default-dest AB_dest)
  53.  
  54.          (if (exists AB_dest)
  55.             (message
  56.                "You have already installed AmigaBase in this directory. "
  57.                "If you continue the old installation will be overwritten!"
  58.             )
  59.          )
  60.       )
  61. )
  62.  
  63. (complete 5)
  64.  
  65. ; Make dest directory and create icon
  66. (makedir AB_dest)
  67. (copyfiles
  68.    (source "AB_dir.icon")
  69.    (dest AB_dest_parent)
  70.    (newname "AmigaBase.info")
  71. )
  72.  
  73. (complete 10)
  74.  
  75. ;copy AmigaBase
  76. (set packed (exists "AmigaBase.lha"))
  77. (if packed
  78.    (set lha (expandpath "lha"))
  79. )
  80.  
  81. (copyfiles
  82.    (prompt "Copying AmigaBase.")
  83.    (help @copyfiles-help)
  84.    (source (if packed "AmigaBase.lha" "AmigaBase"))
  85.    (dest AB_dest)
  86.    (infos)
  87.    (confirm)
  88. )
  89.  
  90. (if packed
  91.    (
  92.       (working "Extracting AmigaBase...")
  93.       (run ("cd \"%s\"\n\"%s\" x AmigaBase.lha\n delete AmigaBase.lha" AB_dest lha))
  94.    )
  95. )
  96.  
  97. (complete 15)
  98.  
  99. ;copy some text files
  100. (copyfiles
  101.    (prompt "Copying the text files.")
  102.       (help @copyfiles-help)
  103.       (source "")
  104.       (dest AB_dest)
  105.       (choices "ReadMe" "LiesMich" "BUGS" "HISTORY" "TODO")
  106.       (infos)
  107.       (confirm)
  108. )
  109.  
  110. (complete 20)
  111.  
  112. ;copy reqtools.library
  113. (copylib
  114.    (prompt "Installing 'reqtools.library'.")
  115.     (help @copylib-help)
  116.     (source
  117.       (if IsKick20
  118.          "libs20/reqtools.library"
  119.          "libs13/reqtools.library"
  120.       )
  121.    )
  122.     (dest "libs:")
  123.     (confirm)
  124. )
  125.  
  126. (complete 30)
  127.  
  128. ;copy gadget.library
  129. (copylib
  130.    (prompt "Installing 'gadget.library'.")
  131.     (help @copylib-help)
  132.     (source "libs13/gadget.library")
  133.     (dest "libs:")
  134.     (confirm)
  135. )
  136.  
  137. (complete 40)
  138.  
  139. (if HD_Installation
  140.    (
  141.       ;make AmigaBase assign in startup-sequence
  142.  
  143.       (startup "AmigaBase"
  144.           (prompt
  145.               "An assign instruction need to be added to the \"S:user-startup\" "
  146.             "so that AmigaBase can be started by double clicking an "
  147.             "AmigaBase project."
  148.          )
  149.           (help @startup-help)
  150.           (command (cat "assign AmigaBase: " AB_dest "\n"))
  151.       )
  152.       (makeassign "AmigaBase" AB_dest)
  153.    )
  154. )
  155.  
  156. (complete 50)
  157.  
  158. ;copy catalog files
  159. (if IsKick20
  160.    (copyfiles
  161.       (prompt "Which additional languages should AmigaBase support?")
  162.       (help "The builtin language of AmigaBase is 'english'. ")
  163.       (source "Catalogs")
  164.       (dest "LOCALE:Catalogs")
  165.       (pattern "#?")
  166.       (confirm)
  167.    )
  168. )
  169.  
  170. (complete 60)
  171.  
  172. ;create "Data" directory
  173. (makedir (tackon AB_dest "Data"))
  174. (copyfiles
  175.    (source "Data.info")
  176.    (dest AB_dest)
  177.    (newname "Data.info")
  178. )
  179.  
  180. (complete 70)
  181.  
  182. ;copy optional examples
  183. (set choice
  184.    (askoptions
  185.       (prompt "Copying optional examples.")
  186.       (help @askoptions-help)
  187.       (choices "Deutsch" "English")
  188.    )
  189. )
  190.  
  191. (if choice
  192.    (
  193.       (set Data_dest (tackon AB_dest "Data"))
  194.  
  195.       (copyfiles
  196.          (prompt "Copying Mandel picture.")
  197.          (help @copyfiles-help)
  198.          (source "Data")
  199.          (dest Data_dest)
  200.          (choices "Graphics")
  201.          (infos)
  202.       )
  203.  
  204.       (set packed (exists "Data/Deutsch.lha"))
  205.       (if packed
  206.          (set lha (expandpath "lha"))
  207.       )
  208.  
  209.       (if (BITAND choice 1)
  210.          (
  211.             (copyfiles
  212.                (prompt "Copying German example projects.")
  213.                (help @copyfiles-help)
  214.                (source "Data")
  215.                (dest Data_dest)
  216.                (choices (if packed "Deutsch.lha" "Deutsch"))
  217.                (infos)
  218.             )
  219.             (if packed
  220.                (
  221.                   (working "Extracting archive...")
  222.                   (run ("cd \"%s\"\n\"%s\" x Deutsch.lha\n delete Deutsch.lha" Data_dest lha))
  223.                )
  224.             )
  225.          )
  226.       )
  227.       (if (BITAND choice 2)
  228.          (
  229.             (copyfiles
  230.                (prompt "Copying English example projects.")
  231.                (help @copyfiles-help)
  232.                (source "Data")
  233.                (dest Data_dest)
  234.                (choices (if packed "English.lha" "English"))
  235.                (infos)
  236.             )
  237.             (if packed
  238.                (
  239.                   (working "Extracting archive...")
  240.                   (run ("cd \"%s\"\n\"%s\" x English.lha\n delete English.lha" Data_dest lha))
  241.                )
  242.             )
  243.          )
  244.       )
  245.    )
  246. )
  247.  
  248. (complete 80)
  249.  
  250. (if (NOT HD_Installation)
  251.    (
  252.       (askdisk
  253.          (prompt
  254.             "All necessary files have been copied to RAM:AmigaBase. "
  255.             "Please insert now the disk \"AmigaBase\"."
  256.          )
  257.          (help @askdisk-help)
  258.          (dest "AmigaBase")
  259.       )
  260.       (copyfiles
  261.          (source AB_dest)
  262.          (dest "AmigaBase:")
  263.          (all)
  264.       )
  265.       (run "delete ram:AmigaBase ram:AmigaBase.info ALL QUIET FORCE")
  266.  
  267.       (set @default-dest "AmigaBase:")
  268.    )
  269. )
  270.  
  271. (complete 100)
  272.  
  273. (exit)
  274.  
  275.